#include <iostream>
using namespace std;
#include <string>
int main(){
int series;
int store[20];
for(int counter=0; counter<20; counter=counter++){
cin>>series;
store[counter]=series;
}
int max=store[0];
int min=store[0];
for(int x=0; x<20; x=x++){
	if (max<store[x]){
		max=store[x];
}
if (min>store[x]){
	min=store[x];
}
}
cout<<"Max: ";
cout<<max<<endl;
cout<<"Min: ";
cout<<min<<endl;
system("pause");
return 0;
}